package com.example.wc.logindemolistview;

import android.content.Context;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by hui on 2017/2/17.
 * 单例，mBlogs为get博客文章列表
 */

public class BlogsLab {
    private static BlogsLab sBlogsLab;

    private List<Blogs> mBlogs;

    public static BlogsLab get(Context context){
        if(sBlogsLab == null) {
            sBlogsLab = new BlogsLab(context);
        }
        return sBlogsLab;
    }

    private BlogsLab(Context context){
        mBlogs = new ArrayList<>();
//        for(int i = 0; i < 20; i++){
//            mBlogs.add(new Blogs("标题" + i, "举头望明月，低头思故乡。举头望明月，低头思故乡。举头望明月，低头思故乡。举头望明月，低头思故乡。" + i));
//        }

    };

    //与网络请求get的信息类型一致
    public static  class Content{
        List<Blogs> content;
    }

    public static class Blog{
        Blogs mBlogs;
    }

    public List<Blogs> getBlogs() {
        return mBlogs;
    }

}
